import { _decorator, Component, find, instantiate, Node, Prefab, sys } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('SideStart')
export class SideStart extends Component {
    @property(Prefab)
    sidePrefab: Prefab;
    @property(Node)
    sideBtnNode:Node

    protected start(): void {
        if (sys.platform==sys.Platform.BYTEDANCE_MINI_GAME) {
            this.sideBtnNode.active=true;
        }
        else{
            this.sideBtnNode.active=false;
        }
    }

    onclickSideBtn() {
        let pre = instantiate(this.sidePrefab);
        pre.setParent(find("Canvas"));
    }

}


